package com.liar.modular.Heat.controller;


import com.alibaba.fastjson.JSON;
import com.liar.base.BaseController;
import com.liar.base.ResultModel;
import com.liar.modular.Heat.entity.SysWeight;
import com.liar.modular.Heat.service.ISysWeightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 小蜗牛找房子
 * @since 2020-07-09
 */
@RestController
@RequestMapping("/sysWeight")
public class SysWeightController extends BaseController {

    @Autowired
    private ISysWeightService iSysWeightService;
    @RequestMapping(value = "list", method = RequestMethod.GET, produces = "text/json;charset=UTF-8")
    public String list(){
        logBefore(logger,"钢铁权重列表");
        ResultModel resultModel = new ResultModel();
        List<SysWeight> list = iSysWeightService.list();
        resultModel.setData(list);
        resultModel.setStatus("200");
        return JSON.toJSONString(resultModel);
    }

}
